package com.haogu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.haogu.entity.Contacts;
import com.haogu.entity.CustomerList;
import com.haogu.entity.VContacts;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ContactsMapper extends BaseMapper<Contacts> {
    Contacts selectContacts(Integer id);

    /**
     * 查询所有联系人
     * @return
     */
    List<VContacts> selectContactsLists(@Param("page") Integer page,@Param("size") Integer size);

    /**
     * 今日、周、月、最近新建查询
     *
     * @return
     */
    List<VContacts> todayNewCreateSelect(@Param("type") String type);

    /**
     * 填充删除时间及删除者的id
     * @param time
     * @param id
     */
    void deleteTime(@Param("deleteId") Integer deleteId,@Param("time") String time, @Param("id") Integer id);

    /**
     * 根据条件模糊查询
     * @param search
     * @param filterSearch
     * @return
     */
    List<VContacts> selectCustomerLike(@Param("search") String search,@Param("filterSearch") String filterSearch);

}
